package org.plumecache.springboot.autoconfigurer;

import com.plumecache.core.InstanceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ansonyin
 */
@ConfigurationProperties(prefix = "plumecache")
public class PlumecacheProperties {

    private Interceptors interceptors = new Interceptors();

    private List<InstanceProperties> instances;

    public List<InstanceProperties> getInstances() {
        return instances;
    }

    public void setInstances(List<InstanceProperties> instances) {
        this.instances = instances;
    }

    public Interceptors getInterceptors() {
        return interceptors;
    }

    public void setInterceptors(Interceptors interceptors) {
        this.interceptors = interceptors;
    }

    static class Interceptors {
        private List<String> include = new ArrayList<>();
        private List<String> exclude = new ArrayList<>();

        public List<String> getExclude() {
            return exclude;
        }

        public void setExclude(List<String> exclude) {
            this.exclude = exclude;
        }

        public List<String> getInclude() {
            return include;
        }

        public void setInclude(List<String> include) {
            this.include = include;
        }
    }
}